package com.bjb.vr.common.service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bjb.vr.common.ao.UmsUserRoleAo;
import com.bjb.vr.common.constant.ThreadLocalConstant;
import com.bjb.vr.common.dto.UmsOptUserRole;
import com.bjb.vr.common.mapper.UmsOptUserRoleMapper;
import com.bjb.vr.common.utils.ThreadLocalUtil;
import com.bjb.vr.common.vo.UmsUserRoleVo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
* @author admin
* @description 针对表【ums_opt_user_role(用户和角色关联表)】的数据库操作Service实现
* @createDate 2022-09-06 14:54:20
*/
@Service
public class UmsOptUserRoleService extends ServiceImpl<UmsOptUserRoleMapper, UmsOptUserRole> {

	@Resource
	private UmsOptUserRoleMapper optUserRoleMapper;

	/**
	 * 查询用户信息
	 *
	 * @param umsUserRoleAo
	 * @return
	 */
	public List<UmsUserRoleVo> queryUserRoleInfo(UmsUserRoleAo umsUserRoleAo) {
		ThreadLocalUtil.set(ThreadLocalConstant.NO_TENANT_ID_VERIFY, true);
		return optUserRoleMapper.selectByCondition(umsUserRoleAo.getUserName(), umsUserRoleAo.getStatus(), umsUserRoleAo.getRoleId());
	}
}




